#include "common_func.h"

//BSP板级支持包所需全局变量
unsigned long UART_BASE = 0xbf000000;					//UART16550的虚地址
unsigned long LCD_UART_BASE = 0xbf040000;				//LCD UART的虚地址
unsigned long CONFREG_TIMER_BASE = 0xbf20f100;			//CONFREG计数器的虚地址
unsigned long CONFREG_CLOCKS_PER_SEC = 100000000L;		//CONFREG时钟频率
unsigned long CORE_CLOCKS_PER_SEC = 33000000L;			//处理器核时钟频率

void RegWrite(unsigned int addr,unsigned int var)
{
	*((volatile unsigned int *)(addr)) = var;
}

void RegWriteb(unsigned int addr,unsigned char var)
{
	*((volatile unsigned char *)(addr)) = var;
}

unsigned int RegRead(unsigned int addr)
{
	return (*((volatile unsigned int *)(addr)));
}

unsigned int RegReadb(unsigned int addr)
{
	return (*((volatile unsigned char *)(addr)));
}



